#pragma once
#include "wfx.h"
#include <iostream>

// Declare the Pointer Type
MAKE_PTR(CCode);


/*
*	\brief A Class represent the Code
*/
class CCode
{
public:

    static CCodePtr create(std::istream& is)
    {
        return CCodePtr(new CCode(is));
    }


    CCode(std::istream& is);
    ~CCode();

public:
    bool GetChar(char& ch);
    bool PeekChar(char& ch);

    size_t GetCharNumber() const {return m_nCharNumber;};
    size_t GetLineNumber() const {return m_nLineNumber;};

private:
    std::istream& m_stream;
    size_t m_nCharNumber;
    size_t m_nLineNumber;
};

